<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateScoreTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
		//用户
        Schema::create('score', function (Blueprint $table) {
            $table->increments('id',100)->comment('用户id唯一值');
			$table->string('考号')->default('')->nullable()->comment('考生号');
			$table->string('学校')->default('')->nullable()->comment('学校');
			$table->string('班级')->default('')->nullable()->comment('班级');
			$table->string('姓名')->default('')->nullable()->comment('姓名');
			$table->string('语文')->default('')->nullable()->comment('语文');
			$table->string('数学')->default('')->nullable()->comment('数学');	
			$table->string('英语')->default('')->nullable()->comment('英语');	
			$table->string('物理')->default('')->nullable()->comment('物理');	
			$table->string('化学')->default('')->nullable()->comment('化学');
			$table->string('政治')->default('')->nullable()->comment('政治');	
			$table->string('历史')->default('')->nullable()->comment('历史');	
			$table->string('生物')->default('')->nullable()->comment('生物');	
			$table->string('地理')->default('')->nullable()->comment('地理');
			$table->string('总分')->default('')->nullable()->comment('总分');
			$table->string('总分A')->default('')->nullable()->comment('总分A');	
			$table->string('总分B')->default('')->nullable()->comment('总分B');	
			$table->string('总分A等级')->default('')->nullable()->comment('总分A等级');	
			$table->string('总分B等级')->default('')->nullable()->comment('总分B等级');
			$table->integer('from_id')->nullable()->comment('来源id');	
			$table->string('from')->default('')->nullable()->comment('来源');	
            $table->timestamps();			
        });	
		
		//用户
        Schema::create('upload', function (Blueprint $table) {
            $table->increments('id')->comment('用户id唯一值');
			$table->integer('type')->default(0)->nullable()->comment('成线表');
			$table->string('name')->default('')->nullable()->comment('原始文件名');
			$table->string('save')->default('')->nullable()->comment('保存文件名');
			$table->string('status')->default('')->nullable()->comment('总分');
            $table->timestamps();			
        });	
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
		Schema::dropIfExists('upload');	
		Schema::dropIfExists('score');	
    }
}
